#include "gxgfunc.h"
#include "md5.h"
#define BUFFERSIZE 1024

typedef struct train_s {
    int length;
    char buf[1000];
} train_t;


/*文件信息结构体*/
typedef struct fileInfo_s {
    int parentId;
    char fileName[BUFFERSIZE];
    int ownerId;
    char md5[40];
    int fileSize;
    int fileType;
} fileInfo_t;

int connectInit(int* pSockFd, char* ip, int port);
int recvn(int sockFd, void* pstart, int len);
int sendn(int sockFd, void* pstart, int len);
int recvFile(const int sockFd, fileInfo_t* pFileBuf);
int sendFile(const int netFd, const char* fileName);

int myShell(const int sockFd);